#include <stdio.h>
int main()
{
    static int money,sum1,sum2,j,i,c[11];
    while(money!=-1){
    	sum1=sum1+money;
    	scanf("%d",&money);
    }
    while(j!=-1){
    scanf("%d",&j);
        switch(j){
                case 1:sum2=sum2+1;c[j]++;break;
                case 2:sum2=sum2+1;c[j]++;break; 
                case 3:sum2=sum2+1;c[j]++;break;
                case 4:sum2=sum2+2;c[j]++;break;
                case 5:sum2=sum2+2;c[j]++;break;
                case 6:sum2=sum2+3;c[j]++;break;
                case 7:sum2=sum2+3;c[j]++;break;
                case 8:sum2=sum2+3;c[j]++;break;
                case 9:sum2=sum2+4;c[j]++;break;
                case 10:sum2=sum2+4;c[j]++;break;
            }
            if(sum1<sum2){
                 printf("Insufficient money");
                 break;
            }
    }
    if(sum1>sum2){
       printf("Total:%dyuan,change:%dyuan\n",sum1,sum1-sum2);
        for(i=1;i<=10;i++){
            if(c[i]!=0){
                switch(i){
                    case 1:printf("Table-water:%d;",c[i]);break; 
                    case 2:printf("Table-water:%d;",c[i]);break; 
                    case 3:printf("Table-water:%d;",c[i]);break;
                    case 4:printf("Coca-Cola:%d;",c[i]);break;
                    case 5:printf("Milk:%d;",c[i]);break;
                    case 6:printf("Beer:%d;",c[i]);break;
                    case 7:printf("Orange-Juice:%d;",c[i]);break;
                    case 8:printf("Sprite:%d;",c[i]);break;
                    case 9:printf("Oolong-Tea:%d;",c[i]);break;
                    case 10:printf("Green-Tea:%d;",c[i]);break;
                }
        }
        }
    }
  return 0;
}
